package com.ruoyi.stock.service.impl;

import com.ruoyi.stock.domain.StockCurrent;
import com.ruoyi.stock.mapper.StockCurrentMapper;
import com.ruoyi.stock.service.IStockCurrentService;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 股票当前信息Service业务层处理
 *
 * @author makun
 * @date 2021-11-14
 */
@Service
@RequiredArgsConstructor
public class StockCurrentServiceImpl implements IStockCurrentService {
  //    @Autowired
  final StockCurrentMapper stockCurrentMapper;

  /**
   * 查询股票当前信息
   *
   * @param id 股票当前信息主键
   * @return 股票当前信息
   */
  @Override
  public StockCurrent selectStockCurrentById(Long id) {
    return stockCurrentMapper.selectStockCurrentById(id);
  }

  /**
   * 查询股票当前信息列表
   *
   * @param stockCurrent 股票当前信息
   * @return 股票当前信息
   */
  @Override
  public List<StockCurrent> selectStockCurrentList(StockCurrent stockCurrent) {
    return stockCurrentMapper.selectStockCurrentList(stockCurrent);
  }

  /**
   * 新增股票当前信息
   *
   * @param stockCurrent 股票当前信息
   * @return 结果
   */
  @Override
  public int insertStockCurrent(StockCurrent stockCurrent) {
    return stockCurrentMapper.insertStockCurrent(stockCurrent);
  }

  @Override
  public int insertBatch(List<StockCurrent> list) {
    return stockCurrentMapper.insertBatch(list);
  }

  /**
   * 修改股票当前信息
   *
   * @param stockCurrent 股票当前信息
   * @return 结果
   */
  @Override
  public int updateStockCurrent(StockCurrent stockCurrent) {
    return stockCurrentMapper.updateStockCurrent(stockCurrent);
  }

  /**
   * 批量删除股票当前信息
   *
   * @param ids 需要删除的股票当前信息主键
   * @return 结果
   */
  @Override
  public int deleteStockCurrentByIds(Long[] ids) {
    return stockCurrentMapper.deleteStockCurrentByIds(ids);
  }

  /**
   * 删除股票当前信息信息
   *
   * @param id 股票当前信息主键
   * @return 结果
   */
  @Override
  public int deleteStockCurrentById(Long id) {
    return stockCurrentMapper.deleteStockCurrentById(id);
  }

  @Override
  public int deleteAll() {
    return stockCurrentMapper.deleteAll();
  }
}
